﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Icoders.MarketTracker.Web.Lib.Command.Bus;
using Icoders.MarketTracker.Web.Lib.Command.Bus.Impl;
using Icoders.MarketTracker.Web.Lib.Command.Helper;
using Icoders.MarketTracker.Web.Lib.Command.Helper.Impl;
using Icoders.MarketTracker.Web.Lib.CommandHandler.Orders;
using Icoders.MarketTracker.Web.Lib.CommandHandler.Orders.Impl;
using Icoders.MarketTracker.Web.Lib.Response.Services;
using Icoders.MarketTracker.Web.Lib.Response.Services.Impl;
using Icoders.MarketTracker.Web.Lib.Security;
using Icoders.MarketTracker.Web.Lib.Security.Impl;
using Icoders.MarketTracker.Web.Lib.Services;
using Icoders.MarketTracker.Web.Lib.Services.Impl;
using StructureMap.Configuration.DSL;

namespace Icoders.MarketTracker.Web.Lib.IOC
{
    public class ServiceRegistry:Registry
    {
        public ServiceRegistry()
        {
            For<ISecurityService>().Use<SecurityService>();
            For<IDropDownService>().Use<DropDownService>();

            For<IPullMasterDataResponseBuilder>().Use<PullMasterDataResponseBuilder>();
            For<IClientMasterDataTrackerRepository>().Use<ClientMasterDataTrackerRepository>();
            For<IMasterDataToDTOMapping>().Use<MasterDataToDTOMapping>();
            For<IObjectSerialzationHelper>().Use<ObjectSerialzationHelper>();
            For<IPullMasterDataResponseBuilder>().Use<PullMasterDataResponseBuilder>();
            For<ICreateApplicationService>().Use<CreateApplicationService>();

            //commands
            For<ICreateOrderCommandHandler>().Use<CreateOrderCommandHandler>();
            For<IAddOrderLineItemCommandHandler>().Use<AddOrderLineItemCommandHandler>();
            For<IConfirmOrderCommandHandler>().Use<ConfirmOrderCommandHandler>();
            For<IResolveCommand>().Use<ResolveCommand>();
            For<IBusPublisher>().Use<StubbedBusPublisher>();
            For<IBusSubscriber>().Use<StubbedBusSubscriber>();
            For<IRunCommandInHost>().Use<RunCommandInHost>();
            For<ICommandValidate>().Use<CommandValidate>();
            For<ICommandDeserialize>().Use<CommandDeserialize>();
        }
    }
}
